import ajax from './ajax'

// 1、获取城市列表
export const reqAddress = geohash  => ajax('https://elm.cangdu.org/v2/pois/' + geohash)
// export const reqAddress = geohash  => ajax('/api/v2/pois/' + geohash)
// 2、获取商铺列表
export const reqShops = ({latitude, longitude}) => ajax('https://elm.cangdu.org/shopping/restaurants', {latitude, longitude})
// export const reqShops = ({latitude, longitude}) => ajax('/api/shopping/restaurants', {latitude, longitude})
// 3、搜索餐馆
export const reqSearchShops = ({geohash,keyword}) => ajax('https://elm.cangdu.org/v4/restaurants',{geohash,keyword})
// export const reqSearchShops = ({geohash,keyword}) => ajax('/api/v4/restaurants',{geohash,keyword})
// 5、获取用户信息
// https://elm.cangdu.org/v1/user
export const reqUserInfo = ({user,password})  => ajax('https://elm.cangdu.org/v1/user',{user,password})
// export const reqUserInfo = ()  => ajax('/api/v1/user')
// 6.退出
// https://elm.cangdu.org/v2/signout
// export const  reqLogout = ()  => ajax('/api/v2/signout')
export const  reqLogout = ()  => ajax('https://elm.cangdu.org/v2/signout')


/*获取商家信息 */ 
export const reqShopInfo = () => ajax('/info') 
/*获取商家评价数组 */ 
export const reqShopRatings = () => ajax('/ratings') /* 获取商家商品数组 */
 export const reqShopGoods = () => ajax('/goods')